<@override name="head"> 
<title>创建订单</title>
<link rel="stylesheet" href="${ctx}/assets/css/daterangepicker.css"/>
<script type="text/javascript" src="${ctx}/assets/js/lib/moment.min.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/lib/jquery.daterangepicker.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/lib/date.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/common/shortcutkey_datePicker.js"></script>

<script type="text/javascript" src="${ctx}/assets/js/common/validate.js"></script>
<script type="text/javascript" src="${ctx}/assets/js/advertiser/order.js"></script>
</@override>    
<@override name="body">
<div id=content_bg>
<#include "/main/home/common.ftl"/>
    <div id= "pagecontent">
        <div id="content">
            <div id="navDiv">
                <ul id="navDiv_ul">
                    <li><i class="icon-home"></i></li>
                    <li><a href="${ctx}/advertiser/main/dashboard">首页</a></li>
                    <li><i class="icon-angle-right"></i></li>
                    <#if role == "agent">
                    <li><a href="${ctx}/advertiser/main/ad/advertiser/list">广告主管理</a></li>
                    <li><i class="icon-angle-right"></i></li>
                    </#if>
                    <li><a href="${ctx}/advertiser/main/ad/order/list?advertiserId=${order.advertiserId!}">订单管理</a></li>
                    <li><i class="icon-angle-right"></i></li>
                    <li class="navDiv_currentLi">创建订单</li>
                </ul>  
            </div>
            <form id="validateForm" action="${ctx}/advertiser/main/ad/order/save" method="post">
                <input type="hidden" id="advertiserId" name="advertiserId" value="${order.advertiserId!}"/>
                <input type="hidden" id="agentId" name="agentId" value="${order.agentId!}"/>
                <input type="hidden" id="id" name="id" value="${order.id!}"/>
                <div class="input-group">
                    <label class="input-label"><span class="lbl-yes">*</span>订单名称：</label>
                    <input class="input-text" value="${order.name!}" tabindex="1" id="name" name="name" type="text" verify="unspecial/255/1/0"/><span class="input-span">例：怡宝</span><span class="spanVaildate"></span>
                </div>
                <input type="hidden" id="dateStart" name="dateStart" />
                <input type="hidden" id="dateEnd" name="dateEnd" />
                <div class="input-group">
                    <label class="input-label"><span class="lbl-yes">*</span>所属人：</label>
                    <select id="ownerId" name="ownerId">
                    <option value="">请选择所属人</option>
                    <#if accountList??>  
                    <#list accountList as item>  
                        <option   
                         <#if item.id==order.ownerId>
                            selected
                         </#if>    value="${item.id}">${item.realName}</option>  
                    </#list>  
                    </#if>  
                    </select>
                </div>
                <div class="input-group">
                        <label class="input-label"><span class="lbl-yes">*</span>订单排期：</label>
                        <span id="calendar_span">
                            <i class="icon-calendar"></i>   
                            <input type="text" name="dateRangePicker" id="dateRangePicker" value="${dateRangePicker!}" readonly/>
                        </span>
                </div>
                
                <div class="input-group">
                    <label class="input-label"><span class="lbl-yes">*</span>订单预算：</label>
                    <input class="input-text" value="${order.budget!}" tabindex="2" id="budget" name="budget" type="text" verify="number/11/1/0"/><span class="input-span">元</span><span class="spanVaildate"></span>
                </div>

                <#if test == "true">
				<div class="input-group">
					<label class="input-label"><span class="lbl-yes">*</span>订单利润率：</label>
					<input class="input-text" value="${order.profit!}" placeholder="请输入订单利润率" tabindex="3" id="profit" name="profit" type="text" verify="number/11/0/0" /><span class="input-span">%</span><span class="spanVaildate"></span>
				</div>
				</#if>
                
                <div id="footBtn">
                    <button class="btn-save" type="submit">提交</button>
                    <button class="btn-cancel" type="button">取消</button>
                </div>
            </form>
        </div>
    </div>
</div>
</@override>
<@extends name="/common/simple.ftl"/>